﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MYData.Entity.DTO.ApiEntity.Input
{
        /// <summary>
        /// 暂存修改Dto
        /// </summary>
        public class ProjectInfoTsUpt_Dto
        {
            /// <summary>
            ///项目主键
            /// </summary>
            [Display(Name = "项目主键")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(64)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectId { get; set; }
            /// <summary>
            ///项目名称
            /// </summary>
            [Display(Name = "项目名称")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectName { get; set; } = "TS";

            /// <summary>
            ///项目编号
            /// </summary>
            [Display(Name = "项目编号")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectNumber { get; set; } = "TS";

            /// <summary>
            ///成果归属部门
            /// </summary>
            [Display(Name = "成果归属部门")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectDepartresult { get; set; } = "TS";

            /// <summary>
            ///负责人所属部门
            /// </summary>
            [Display(Name = "负责人所属部门")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string projectDepartperson { get; set; } = "TS";

            /// <summary>
            ///科研秘书联系方式
            /// </summary>
            [Display(Name = "科研秘书联系方式")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string secretaryPhone { get; set; } = "TS";

            /// <summary>
            ///立项年度
            /// </summary>
            [Display(Name = "立项年度")]
            [Column(TypeName = "int")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public int projectYear { get; set; } = 2023;

            /// <summary>
            ///登记人
            /// </summary>
            [Display(Name = "登记人")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string projectWriteperson { get; set; } = "TS";

            /// <summary>
            ///专项经费(万元)
            /// </summary>
            [Display(Name = "专项经费(万元)")]
            [DisplayFormat(DataFormatString = "10,2")]
            [Column(TypeName = "decimal")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public decimal specialMoney { get; set; } = 30;

            /// <summary>
            ///学科门类
            /// </summary>
            [Display(Name = "学科门类")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectSubject { get; set; } = "TS";

            /// <summary>
            ///结束时间
            /// </summary>
            [Display(Name = "结束时间")]
            [Column(TypeName = "datetime")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public DateTime projectEndtime { get; set; } = DateTime.Now;

            /// <summary>
            ///项目类型
            /// </summary>
            [Display(Name = "项目类型")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectType { get; set; } = "TS";

            /// <summary>
            ///项目来源单位
            /// </summary>
            [Display(Name = "项目来源单位")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string projectScoreunit { get; set; } = "TS";

            /// <summary>
            ///项目承担单位
            /// </summary>
            [Display(Name = "项目承担单位")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string projectUndertakeunit { get; set; } = "TS";

            /// <summary>
            ///是否委托外单位进行测试或测试加工
            /// </summary>
            [Display(Name = "是否委托外单位进行测试或测试加工")]
            [Column(TypeName = "bool")]
            [Editable(true)]
            public bool? projectEntrust { get; set; } = false;

            /// <summary>
            ///备注
            /// </summary>
            [Display(Name = "备注")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string projectRemark { get; set; } = "TS";

            /// <summary>
            ///是否涉及人体
            /// </summary>
            [Display(Name = "是否涉及人体")]
            [Column(TypeName = "bool")]
            [Editable(true)]
            public bool? touchPerson { get; set; } = false;

            /// <summary>
            ///人体补充
            /// </summary>
            [Display(Name = "人体补充")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string personRemark { get; set; } = "TS";

            /// <summary>
            ///负责人
            /// </summary>
            [Display(Name = "负责人")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectPerson { get; set; } = "TS";

            /// <summary>
            ///科研秘书(负责成果、经费)
            /// </summary>
            [Display(Name = "科研秘书(负责成果、经费)")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectSecretary { get; set; } = "TS";

            /// <summary>
            ///负责人类型
            /// </summary>
            [Display(Name = "负责人类型")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectPersontype { get; set; } = "TS";

            /// <summary>
            ///登记时间
            /// </summary>
            [Display(Name = "登记时间")]
            [Column(TypeName = "datetime")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public DateTime projectWritetime { get; set; } = DateTime.Now;

            /// <summary>
            ///项目经费(万元)
            /// </summary>
            [Display(Name = "项目经费(万元)")]
            [Column(TypeName = "decimal")]
            [Editable(true)]
            public decimal? projectMoney { get; set; } = 20;

            /// <summary>
            ///配套经费(万元)
            /// </summary>
            [Display(Name = "配套经费(万元)")]
            [DisplayFormat(DataFormatString = "10,2")]
            [Column(TypeName = "decimal")]
            [Editable(true)]
            public decimal? supportMoney { get; set; } = 10;

            /// <summary>
            ///项目开始时间
            /// </summary>
            [Display(Name = "项目开始时间")]
            [Column(TypeName = "datetime")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public DateTime projectStarttime { get; set; } = DateTime.Now;

            /// <summary>
            ///研究类型
            /// </summary>
            [Display(Name = "研究类型")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectStudytype { get; set; } = "TS";

            /// <summary>
            ///项目级别
            /// </summary>
            [Display(Name = "项目级别")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectLevel { get; set; } = "TS";

            /// <summary>
            ///项目类别
            /// </summary>
            [Display(Name = "项目类别")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string projectKind { get; set; } = "TS";
            /// <summary>
            ///软删除
            /// </summary>
            [Display(Name = "软删除")]
            [Column(TypeName = "int")]
            [Editable(true)]
            public int? IsDel { get; set; } = 0;

            /// <summary>
            ///是否暂存
            /// </summary>
            [Display(Name = "是否暂存")]
            [Column(TypeName = "bool")]
            [Editable(true)]
            public bool? isTs { get; set; }

            public IEnumerable<ProjectFundingItemUpdate_Dto>? data { get; set; }
            public IEnumerable<tb_project_expectedresultsUpdate_Dto>? dataone { get; set; }
            public IEnumerable<tb_project_participationerUpdate_Dto>? datatwo { get; set; }
            public IEnumerable<tb_project_planontargetUpdate_Dto>? datathree { get; set; }
        }

        /// <summary>
        /// 项目立项经费DTO
        /// </summary>
        public class ProjectFundingItemUpdate_Dto
        {
            /// <summary>
            ///项目预算模板与项目关系表主键
            /// </summary>
            [Display(Name = "项目预算模板与项目关系表主键")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string Id { get; set; }
            /// <summary>
            ///经费模板Id
            /// </summary>
            [Display(Name = "经费模板Id")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(64)")]
            [Editable(true)]
            public string templateId { get; set; } = "TS";

            /// <summary>
            ///经费科目Id
            /// </summary>
            [Display(Name = "经费科目Id")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(64)")]
            [Editable(true)]
            public string subjectId { get; set; } = "TS";
            /// <summary>
            ///项目Id
            /// </summary>
            [Display(Name = "项目Id")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(64)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string projectId { get; set; } = "TS";

            /// <summary>
            ///专项经费
            /// </summary>
            [Display(Name = "专项经费")]
            [DisplayFormat(DataFormatString = "10,2")]
            [Column(TypeName = "decimal")]
            [Editable(true)]
            public decimal directFunding { get; set; } = 20;

            /// <summary>
            ///配套经费
            /// </summary>
            [Display(Name = "配套经费")]
            [DisplayFormat(DataFormatString = "10,2")]
            [Column(TypeName = "decimal")]
            [Editable(true)]
            public decimal? overheadFunding { get; set; } = 10;
        }
        /// <summary>
        /// 项目预期成果表DTO
        /// </summary>
        public class tb_project_expectedresultsUpdate_Dto
        {
            /// <summary>
            ///主键编号
            /// </summary>
            [Display(Name = "主键编号")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(64)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string id { get; set; }
        /// <summary>
        ///预期成果
        /// </summary>
        [Display(Name = "预期成果")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string? results { get; set; } = "TS";

        /// <summary>
        ///项目立项基本信息外键
        /// </summary>
        [Display(Name = "项目立项基本信息外键")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projectId { get; set; } = "TS";
    }
        /// <summary>
        /// 项目参与人信息表DTO
        /// </summary>
        public class tb_project_participationerUpdate_Dto
        {
            /// <summary>
            ///主键编号
            /// </summary>
            [Display(Name = "主键编号")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(64)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string participantsId { get; set; }
        /// <summary>
        ///参与人类别
        /// </summary>
        [Display(Name = "参与人类别")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int participantsType { get; set; } = 0;

        /// <summary>
        ///参与人姓名
        /// </summary>
        [Display(Name = "参与人姓名")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string participantsName { get; set; } = "TS";

        /// <summary>
        ///所属单位
        /// </summary>
        [Display(Name = "所属单位")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string affiliatedUnit { get; set; } = "TS";

        /// <summary>
        ///参与人现专业技术职务
        /// </summary>
        [Display(Name = "参与人现专业技术职务")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string participantsJob { get; set; } = "TS";

        /// <summary>
        ///现参与项目数量
        /// </summary>
        [Display(Name = "现参与项目数量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int projectQuantity { get; set; } = 0;

        /// <summary>
        ///责任分工
        /// </summary>
        [Display(Name = "责任分工")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projectDivision { get; set; } = "TS";

        /// <summary>
        ///投入本项目计划工作时间
        /// </summary>
        [Display(Name = "投入本项目计划工作时间")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int workingHours { get; set; } = 0;

        /// <summary>
        ///每月资助标准
        /// </summary>
        [Display(Name = "每月资助标准")]
        [DisplayFormat(DataFormatString = "10,2")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public decimal salary { get; set; } = 200;
        [Display(Name = "项目外键")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projectId { get; set; }
    }
        /// <summary>
        /// 计划于目标表
        /// </summary>
        public class tb_project_planontargetUpdate_Dto
        {
            /// <summary>
            ///计划于目标主键编号
            /// </summary>
            [Display(Name = "计划于目标主键编号")]
            [MaxLength(64)]
            [Column(TypeName = "nvarchar(64)")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public string id { get; set; }
            /// <summary>
            ///开始时间
            /// </summary>
            [Display(Name = "开始时间")]
            [Column(TypeName = "datetime")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public DateTime startTime { get; set; }=DateTime.Now;

            /// <summary>
            ///结束时间
            /// </summary>
            [Display(Name = "结束时间")]
            [Column(TypeName = "datetime")]
            [Editable(true)]
            [Required(AllowEmptyStrings = false)]
            public DateTime endTime { get; set; } = DateTime.Now;

        /// <summary>
        ///计划
        /// </summary>
        [Display(Name = "计划")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string plan { get; set; } = "TS";

        /// <summary>
        ///目标
        /// </summary>
        [Display(Name = "目标")]
            [MaxLength(255)]
            [Column(TypeName = "nvarchar(255)")]
            [Editable(true)]
            public string? target { get; set; } = "TS";
        /// <summary>
        ///基本立项信息外键
        /// </summary>
        [Display(Name = "基本立项信息外键")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projectId { get; set; } = "TS";

    }
    
}
